/**
 * 
 */
package com.angel.email.dtos;

import javax.mail.Message.RecipientType;




/**
 * @author Guille Salazar
 * @since 21/Jul/2009
 *
 */
public enum EmailRecipientType {
	
	BCC("BCC"),
	TO("TO"),
	CC("CC");

	private EmailRecipientType(String recipientType) {
		this.recipientType = recipientType;
	}

	private String recipientType;

	public String getRecipientType() {
		return this.recipientType;
	}
	
	public static EmailRecipientType findEmailRecipientType(RecipientType type){
		for(EmailRecipientType ert : values()){
			if(ert.getRecipientType().equalsIgnoreCase(type.toString())){
				return ert;
			}
		}
		return null;
	}

}
